#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int SData;

typedef struct SList
{
	SData data;
	struct SList* next;
}SList;

typedef struct SListNode
{
	SData LTData;
	struct SListNode* prev;
	struct SListNode* next;
}LTNode;

LTNode* BuyNode(SData x);

LTNode* LTInit();

void LTPushBack(LTNode* phead, SData x);

void LTPushFront(LTNode*phead,SData x);

void LTPopBack(LTNode* phead);

void LTPopFront(LTNode* phead);

int LTSize(LTNode* phead);

LTNode* LTFind(LTNode* phead, SData x);

void LTInsert(LTNode* pos, SData x);

void LTErase(LTNode* pos);

void LTPrint(LTNode* phead);

SList* BuySListNode(SData x);

void SListPrint(SList* plist);

void SListPushFront(SList** pplist, SData x);

void SListPushBack(SList** pplist, SData x);

void SListPopFront(SList** pplist);

void SListPopBack(SList** pplist);

SList* SListFind(SList* plist, SData x);

void SListInsertAfter(SList* pos, SData x);

void SListEraseAfter(SList* pos);

void SListDestory(SList* plist);

void SListPrint(SList* s);